//
// Created by 吴锐 on 2022/3/3.
//

#include "iostream"
#include "vector"
#include "algorithm"

using namespace std;

class GreaterFive {
public:
    bool operator()(int val){
        return val > 5;
    }
};

void test01(){
    vector<int> v;

    for(int i = 0 ; i < 10 ; i++){
        v.push_back(i);
    }

    vector<int>::iterator it = find_if(v.begin(), v.end(),GreaterFive());

    if(it == v.end()){
        cout << "未找到";
    }else {
        cout << "找到了大于五的数字: " << *it << endl;
    }
}

int main(){
    test01();
    return 0;
}